<template>
<div>
    <h1>这里是首页</h1>
</div>
</template>
<script lang="ts" name="Home" setup>
    import { onMounted } from 'vue';
    import { useRouter } from 'vue-router';

    const router = useRouter()
    
    //看首页三秒钟跳转到新闻页面
    onMounted(()=>{
        setTimeout(()=>{
            //console.log("---------");
            
            router.push('/news')
            
        }, 3000)
    })
</script>